{% extends "base.html" %}

{% block page_title %}My Elections{% endblock %}

{% block content %}
  <h3>My Elections</h3>
  {% for election in elections %}
  <div class="box flex_column_item">
      <div class="box_header">
        <a href="/elections/{{ election.id }}/view">{{ election.title }}</a>
      </div>
      <div class="box_contents">
        <ul>
          {% for candidate in election.candidates %}
          <li>{{ candidate.name }}: {{ candidate.vote_count }}</li>
          {% endfor %}
        </ul>
        <a href="/elections/{{ election.id }}/view">View Details &gt;&gt;</a>
      </div>
    </div>
  {% endfor %}
{% endblock content %}